package com.ruoyi.oss.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.oss.entity.handler.PlatformConfigJsonTypeHandler;
import com.ruoyi.oss.model.PlatformConfig;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;

import java.io.Serializable;

/**
 * 存储平台
 * @TableName storage_platform
 */
@TableName(value ="storage_platform",autoResultMap = true)
@Data
public class StoragePlatform implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer gid;

    /**
     * 平台类型minio\local-plus
     */
    private String platformType;

    /**
     * 平台key
     */
    private String platformKey;

    /**
     * 名称
     */
    private String platformName;

    /**
     * 基础路径
     */
    private String basePath;

    /**
     * 平台域名
     */
    private String doMain;


    /**
     * 是否启用 y是n否
     */
    private String enableStorage;


    /**
     * 平台属性json
     */
    @TableField(value = "platform_attr",jdbcType = JdbcType.VARCHAR, typeHandler = PlatformConfigJsonTypeHandler.class)
    private PlatformConfig platformAttr;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}